<?php
/**
 * The following code, none of which has BUG.
 *
 * @author: BD<657306123@qq.com>
 * @date: 2019/11/20 15:30
 */
declare (strict_types = 1);

namespace app\common\service;

use think\facade\App;

class AppPath{

	/**
	 * 获取系统插件目录
	 *
	 * @return string
	 */
	public static function getAddonsPath():string{
		return App::getRootPath()."addons";
	}

	/**
	 * 获取插件目录
	 *
	 * @return string
	 */
	public static function getPluginsPath():string{
		return App::getRootPath()."plugins";
	}

	/**
	 * 获取开放目录
	 *
	 * @return string
	 */
	public static function getPublicPath():string{
		return App::getRootPath()."public";
	}

	/**
	 * 获取上传目录
	 *
	 * @return string
	 */
	public static function getUploadsPath():string{
		return self::getPublicPath().DIRECTORY_SEPARATOR.'uploads';
	}
}
